ARG NGINX_VERSION=1.15
FROM nginx:${NGINX_VERSION}-alpine

#更换源
RUN  sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories

#安装软件
RUN apk update && apk upgrade && apk add --no-cache bash vim net-tools curl busybox-extras ca-certificates tzdata

#更改时区
ARG TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN adduser -D -H -u 1000 -s /bin/bash www-data

COPY ./conf/nginx.conf /etc/nginx/nginx.conf

CMD ["nginx"]

EXPOSE 80 443
